package com.example.demo.mapper;

import com.example.demo.entity.Course;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {


    @Insert("insert into course(id, name, content) values(#{id}, #{name}, #{content})")
    int insertOne(Course course);

    @Select("select * from course")
    List<Course> select();
}
